package com.smarthospital.service;

import com.smarthospital.entity.dto.LoginResultDTO;
import com.smarthospital.entity.pojo.Doctor;
import com.smarthospital.entity.pojo.User;

import javax.servlet.http.HttpServletRequest;

public interface LoginService {

    /**
     * 登录，生成token
     * @param source  来源 0_小程序
     * @param code  微信code
     * @return  token
     */
    LoginResultDTO login(Integer source, String code);

    /**
     * 校验token
     * @param request
     * @return User
     */
    User checkToken(HttpServletRequest request);

    Doctor checkIsDoctor(String idCardNum);

}
